# Contributor: Milan P. Stanić <mps@arvanta.net>
# Maintainer: Milan P. Stanić <mps@arvanta.net>
pkgname=zathura-pdf-mupdf
pkgver=0.3.8
pkgrel=1
pkgdesc="mupdf plugin to zathura"
url="https://git.pwmt.org/pwmt/zathura-pdf-mupdf"
arch="all"
license="Zlib"
options="!check" # no test suite
makedepends="meson ninja mupdf mupdf-dev zathura-dev girara-dev openssl1.1-compat-dev
	openjpeg-dev libjpeg-turbo-dev jbig2dec-dev gumbo-parser-dev"
depends="zathura !zathura-pdf-poppler"
source="https://pwmt.org/projects/zathura-pdf-mupdf/download/zathura-pdf-mupdf-$pkgver.tar.xz
	fix-meson.build.patch
	mupdf-1.20.0.patch
	"

build() {
	abuild-meson build
	meson compile ${JOBS:+-j ${JOBS}} -C build
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C build
}

sha512sums="
c2ec4a204446822eb3771673e99ddc42d6ffdfbbb9fc079e09442f0b5a6e2397190d2a8079a92f2d08d5824199760a90d192cb517c9f17676102f3ed69edd5a0  zathura-pdf-mupdf-0.3.8.tar.xz
2d9c69de4e10edb7d8e95915038c84a68843063e4a84b0284fc7f987002cb1a56eba5087619dd4a29f3077cc7aab5a02755d5c42a325f271725195b86c8aa540  fix-meson.build.patch
8ee84b2195774fecebc7a13fb2d9b956232e580dad82a2e825a9f1d9393f0d5368fc91440e70925eb4bdb6d1aa1217d2833b2799623e383e6ebebe1c9da1ec30  mupdf-1.20.0.patch
"
